<%inherit file="base.html"/>
<%def name="head()">
<script>
</script>
</%def>
<%def name="body()">
<section class="content">
    <div class="box box-default">
        <div class="box-header">
            <i class="fa fa-hdd-o"></i>
            <h3 class="box-title">日志查询</h3>
            <div class="bar pull-right"><a href="javascript:history.go(-1);">返回</a></div>
        </div>
        <div class="box-body">
            <div class="container">
                <form class="form-horizontal form-well" role="form" action="/admin/logger" method="post" >
                    ${xsrf_form_html()}
                    <label class="col-sm-3 control-label" id="lab_log_name_name" for="log_name">日志类型</label>
                    <div class="col-sm-6">
                    <select required="required" class="form-control" id="log_name" placeholder="日志类型" name="log_name">
                     <option value="radius-manage" ${"selected" if log_name=='radius-manage' else ''}>管理系统日志</option>
                     <option value="radius-worker" ${"selected" if log_name=='radius-worker' else ''}>认证计费日志</option>
                     <option value="radius-task" ${"selected" if log_name=='radius-task' else ''}>任务执行日志</option>
                    </select>
                    </div>
                    <div class="col-sm-3">
                    <button type="submit" class="btn btn-md bg-navy" id="submit" placeholder="submit" name="submit"><b>查询</b></button>
                    </div>
                </form>

                 % if current_user.opr_type == 0:
                <div class="pull-left bottom10">
                     <a href="/admin/logger/download?log_name=${log_name}">下载当前日志</a>
                </div>
                % endif
                <div class="clearfix"></div>
                % if msg:
                <div class="well">
                ${msg}</div>
                % endif
            </div>
        </div>
    </div>
</section>
</%def>